#include "shm.hpp"

//?????
int main()
{
     NameFifo fifo(PATH,NAME);
    
     FifoPer fiforead(PATH,NAME);
      fiforead.FifoForRead();
    //  fiforead.Read();

    //////// ???? ////////////////
    //IPC_CREAT | IPC_EXCL | shm_mode
    Shm shm(pathname,projid,IPC_CREAT | IPC_EXCL | shm_mode);
    char* addr = (char*)shm.VirtualAddr();

    while(true)
    {
        //printf("server:%s",addr);
        if(fiforead.Wait())
        {
            std::cout << addr << std::endl;
        }
    }

    return 0;
}